package designmodel.builder.经典建造者模式;

/**
 *
 * @author scylla
 * @version V1.0
 * @project echo-java-base
 * @title
 * @package designmodel.builder.经典建造者模式
 * @since 2021/12/15 6:04 下午
 */
public class ConcretLenovoBuilder extends ComputerBuilder {

    private Computer computer;

    public ConcretLenovoBuilder() {
        this.computer = new Computer("英特尔", "");
    }

    @Override
    public Computer getComputer() {
        return this.computer;
    }

    @Override
    public ComputerBuilder usbCount() {
        computer.setUsbCount(2);
        return this;
    }

    @Override
    public ComputerBuilder keyboard() {
        computer.setKeyboard("联想键盘");
        return this;
    }

    @Override
    public ComputerBuilder display() {
        computer.setDisplay("联想显示器");
        return this;
    }
}
